'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;
    // router.get('/', controller.home.index);


    //第三方登录
    router.post('/api/giteeLogin', controller.login.giteeLogin)

    //登录
    router.post('/api/login', controller.login.login)

    //注册
    router.post('/api/sign', controller.sign.sign)

    //房源管理
    router.post('/api/housingList', controller.home.housingList)

    //房源管理删除
    router.delete('/api/housingDel', controller.home.housingDel)

    //全部数据
    router.post('/api/allList', controller.home.allList)

    //将mock数据添加到数据库
    // router.get("/api/addList", controller.home.addList);

    router.get('/api/getUserInfo', controller.login.getUserInfo)

    //图片上传
    router.post('/api/upalyoss', controller.oss.upalyoss)

    //视频上传
    router.post('/api/upalympsi', controller.oss.upalympsi)

    //添加数据
    router.post('/api/addtolist', controller.addList.addtolist)

    //删除数据
    router.post('/api/housdel', controller.housdel.housdel)

};